<?php

/**
 * Joomla! 1.5 component retweet
 * @version 0.1
 * @author Chris Borkowski
 * @package com_retweet
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 **/

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * @package retweet
 */
class RetweetHelper {
	function checkCategories() {
		global $mainframe;
		$db = &JFactory::getDBO();
		$db -> setQuery("SELECT * FROM #__categories WHERE `section`='com_retweet'");
		$rows = $db -> loadAssocList();
		if (empty($rows)) {
			$mainframe -> enqueueMessage(JText::_('You have no categories configured yet'), 'notice');
			return false;
		}
		return true;
	}

}
